﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BGM_Project_SendMessage.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.Form.BGM_Project_SendMessage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <title>เลือกผู้อนุมัติ</title>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <script type="text/javascript" src="../../Scripts/Common.js"></script>
    <script type="text/javascript" src="../../Scripts/DatePicker.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    
    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdSave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cmdSave" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    
    <script type="text/javascript">
        function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        
        function returnToParent()
        {
            var oArg = new Object();
            var oWnd = GetRadWindow();
            
            oWnd.close(oArg);
        }

        function UpdateItemCountField(sender, args) {
            //set the footer text
            sender.get_dropDownElement().lastChild.innerHTML = "ทั้งหมด " + sender.get_items().get_count() + " รายการ";
        }

        function conFirmDel(str) {
            return confirm(str);
        }
    </script>
    
    <div style="padding: 10px"  >
    <asp:Panel ID="Panel1" runat="server" CssClass="defaultFont">
        <table width="100%">
            <tr>
                <td width="100px" align="right">
                    ผู้รับข้อความ :
                </td>
                <td>
                    <asp:Label ID="lblEmpSeq" runat="server" Visible="false" />
                    <telerik:RadComboBox ID="ddlEmpSeq" runat="server"
                        Filter="Contains" style="z-index: 9900;"
                        Visible="true" AutoPostBack="true"
                        Height="190px" Width="100%"
                        MarkFirstMatch="true" EnableLoadOnDemand="true"
                        HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
                        OnDataBound="ddlEmpSeq_DataBound" OnItemDataBound="ddlEmpSeq_ItemDataBound"
                        OnItemsRequested="ddlEmpSeq_ItemsRequested"
                        OnSelectedIndexChanged="ddlEmpSeq_SelectedIndexChanged">
                        <HeaderTemplate>
                            <table width="100%">
                                <tr>
                                    <td align="center" width="150px">ชื่อ-สกุล</td>
                                    <td align="center" width="150px">ตำแหน่งบริหาร</td>
                                    <td align="center" width="100px">ระดับ</td>
                                    <td align="center" >สังกัด</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table width="600px" >
                                <tr>
                                    <td width="150px"><%# DataBinder.Eval(Container.DataItem, "full_name") %></td>
                                    <td width="150px"><%# DataBinder.Eval(Container.DataItem, "exec_pos_name")%></td>
                                    <td width="100px"><%# DataBinder.Eval(Container.DataItem, "class_name") %></td>
                                    <td ><%# DataBinder.Eval(Container.DataItem, "job_site_name") %></td>
                                </tr>
                            </table>
                            <div style='height: <%# String.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "misc") as string) 
                                ? "0px" : "24px" %>; 
                                display:table-cell;
                                text-align: center;
                                vertical-align: middle; 
                                width: 600px'>
                                <%# DataBinder.Eval(Container.DataItem, "misc") %>
                            </div>
                        </ItemTemplate>
                        <FooterTemplate>
                            ทั้งหมด
                            <asp:Literal runat="server" ID="RadComboItemsCount" />
                            รายการ
                        </FooterTemplate>
                    </telerik:RadComboBox>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td width="100px" align="right">
                    ตำแหน่ง :
                </td>
                <td>
                    <asp:Label ID="lblPosName" runat="server" ForeColor="Brown" Visible="true" />
                </td>
                <td width="100px" align="right">
                    ระดับ :
                </td>
                <td width="200px">
                    <asp:Label ID="lblClassName" runat="server" ForeColor="Brown" Visible="true" />
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td width="100px" align="right">
                    ตำแหน่งบริหาร :
                </td>
                <td>
                    <asp:Label ID="lblExecPosName" runat="server" ForeColor="Brown" Visible="true" />
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td width="100px" align="right">
                    หน่วยงาน :
                </td>
                <td>
                    <asp:Label ID="lblJobsiteName" runat="server" ForeColor="Brown" Visible="true" />
                </td>
            </tr>
        </table>
        
    </asp:Panel>
    <br />
    <table width="100%" style="border-top-style: solid; border-width: 1px; border-color: #999999">
        <tr>
            <td align="center">
                <asp:LinkButton ID="cmdSave" runat="server"
                    Text="บันทึก" CssClass="LinkButton" 
                    OnClientClick="javascript:return conFirmDel('ยืนยันการส่งข้อความ')"
                    OnClick="cmdSave_Click" />
            </td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>


